﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GameAutomationLibrary
{
    [Serializable]
    public class GameRoleSetting : GameSettingBase
    {

        public string FullName
        {
            get { return string.Format("{0}-{1}-{2}-{3}", Provider, Area, LoginName, LoginId); }
        }

        public string Name
        {
            get { return string.Format("[{0}-{1}]{2}", Provider, Area,RoleName); }
        }

        /// <summary>
        /// 
        /// </summary>
        public string Provider
        {
            get { return GetByKey("Provider"); }
            set { SetByKey("Provider", value); }
        }

        /// <summary>
        /// 
        /// </summary>
        public string Area
        {
            get { return GetByKey("Area"); }
            set { SetByKey("Area", value); }
        }


        /// <summary>
        /// 
        /// </summary>
        public string LoginUrl
        {
            get { return GetByKey("LoginUrl"); }
            set { SetByKey("LoginUrl", value); }
        }

        /// <summary>
        /// 
        /// </summary>
        public string LoginName
        {
            get { return GetByKey("LoginName"); }
            set { SetByKey("LoginName", value); }
        }

        /// <summary>
        /// 
        /// </summary>
        public string LoginId
        {
            get { return GetByKey("LoginId"); }
            set { SetByKey("LoginId", value); }
        }

        /// <summary>
        /// 
        /// </summary>
        public string LoginPassword
        {
            get { return GetByKey("LoginPassword"); }
            set { SetByKey("LoginPassword", value); }
        }

        /// <summary>
        /// 
        /// </summary>
        public string RoleName
        {
            get { return GetByKey("RoleName"); }
            set { SetByKey("RoleName", value); }
        }

        /// <summary>
        /// 
        /// </summary>
        public string IsBackground
        {
            get { return GetByKey("IsBackground"); }
            set { SetByKey("IsBackground", value); }
        }

        /// <summary>
        /// 是否根据UserId登录
        /// 是1
        /// 否0，则根据UserName登录
        /// </summary>
        public string LoginByUserId
        {
            get { return GetByKey("LoginByUserId"); }
            set { SetByKey("LoginByUserId", value); }
        }

    }
}
